/**
 * @file comfunct.h
 * @author Yao Zongyou <yaozy2010@gmail.com>
 * @date 2011-03-26
 */

#ifndef COMFUNCT_H_2011_03_26
#define COMFUNCT_H_2011_03_26

#ifdef BUILD_COMFUNCT_DLL
#define EXPORT_COMFUNCT __declspec(dllexport)
#else
#define EXPORT_COMFUNCT __declspec(dllimport)
#endif

#include <wininet.h>         /* For HINTERNET definition */

EXPORT_COMFUNCT void __cdecl SetStatusA(HWND, UINT, int, LPCSTR);
EXPORT_COMFUNCT void __cdecl SetStatusW(HWND, UINT, int, LPCWSTR);

EXPORT_COMFUNCT HINTERNET __cdecl ConnectHandleA(LPCSTR);
EXPORT_COMFUNCT HINTERNET __cdecl ConnectHandleW(LPCWSTR);

EXPORT_COMFUNCT HINTERNET __cdecl ServerConnectA(HINTERNET, LPCSTR);
EXPORT_COMFUNCT HINTERNET __cdecl ServerConnectW(HINTERNET, LPCWSTR);

EXPORT_COMFUNCT char * __cdecl ASCIIConversion(LPCWSTR);

EXPORT_COMFUNCT WCHAR * __cdecl UnicodeConversion(LPCSTR);

EXPORT_COMFUNCT void __cdecl ChangeTextFont(HWND, HFONT);

EXPORT_COMFUNCT void __cdecl FreePointer(void *);

EXPORT_COMFUNCT const char * __cdecl GetLocalTextA(unsigned int);
EXPORT_COMFUNCT const WCHAR * __cdecl GetLocalTextW(unsigned int);

EXPORT_COMFUNCT void __cdecl SetupLanguage(void);

EXPORT_COMFUNCT char * __cdecl GetCurrentLanguage(void);

EXPORT_COMFUNCT LRESULT CALLBACK MultiMediaKeyHook(int, WPARAM, LPARAM);

#ifdef UNICODE
#define SetStatus SetStatusW
#define ServerConnect ServerConnectW
#define ConnectHandle ConnectHandleW
#define GetLocalText GetLocalTextW
#else
#define SetStatus SetStatusA
#define ServerConnect ServerConnectA
#define ConnectHandle ConnectHandleA
#define GetLocalText GetLocalTextA
#endif

#endif /* COMFUNCT_H_2011_03_26 */
